home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-03-10 | 18.9 KB | 1,272 lines |
- Welcome to
- ObjectVision
- First Look!
-
- What you're about to
- see is not a
- demonstration -- it's a
- real, live working copy
- of ObjectVision. And
- now you'll use it to
- create an actual
- ObjectVision
- application! Just
- remember these keys:
-
- * Whenever you're
- ready to take the next
- step, press F2 for more
- instructions.
-
- * To redisplay the
- previous instruction,
- hold down the ALT key
- and press F2.
-
- To continue now, press
- the F2 key...
- x
-
- NOTE:
- How to cancel
- First Look.
-
- To cancel this tutorial at
- any time:
-
- 1) Close any tools that
- you're using (such as the
- Form Tool or Tree
- Tool).
-
- 2) Press the F12 key.
- You will be asked to
- confirm that you wish to
- cancel.
-
- To continue now, press
- the F2 key...
- x
-
- What you'll do in the
- next few minutes.
-
- ObjectVision makes
- creating Windows &
- OS/2 applications as
- easy as A-B-C:
-
- A. APPLICATION
- INTERFACE.
-
- First, you'll build your
- Application Interface by
- placing objects (fields,
- buttons, tables) on a
- form and changing their
- size, shape and color to
- your liking.
-
- To continue, press F2.
- x
-
- (A-B-Cs continued...)
-
- B. BUSINESS RULES.
-
- Next, you'll embed logic
- into your application by
- creating "value" and
- "event" trees that define
- how your application
- will work.
-
- C. CONNECTIONS.
-
- Finally, you'll link the
- fields in your application
- to a database.
-
- To continue, press F2.
- x
- ACTION:
- Start by activating the
- TOOLS Menu.
-
- 1) Click on the TOOLS
- option on the menu bar
- above.
-
- 2) From the TOOLS
- menu select the FORM
- tool: (TOOLS|FORM)
-
- This lets you create a
- basic form on which
- you'll add objects and
- logic. Later, you'll link
- those objects to a
- database.
-
- We've identified each
- button on the Form
- Tool's Object Bar to let
- you more easily identify
- the icons you need to
- click.
-
- To continue, press F2.
- x
-
- NOTE:
- This form shows you an
- example of what you'll
- accomplish next.
-
- You'll be creating two
- fields, SALE AMOUNT
- and COMMISSION,
- defining their properties
- and calculating the
- commission amount
- through the use of a
- value tree.
-
- To continue, press F2.
- x
-
- ACTION:
- Next, create, name and
- draw a Field.
-
- 1) Click on the FIELD
- icon.
-
- Then, press F2...
- x
-
- ACTION:
- Name and position
- the field.
-
- 2) Name it:
-
- SALE AMOUNT
-
- Then click OK or press
- Enter.
-
- Now, draw the FIELD.
-
- 3) Click on the form
- wherever you want your
- field to appear.
-
- To continue, press F2.
- x
-
- Define the properties of
- your object.
-
- The handles at each
- corner of your new
- FIELD let you stretch
- the FIELD to any size
- you want.
-
- To operate those
- handles, click on and
- drag them with your
- mouse.
-
- To continue, press F2.
- x
-
- ACTION:
- Select object properties.
-
- 1) To find out what
- properties are available
- for your field object,
- place your mouse arrow
- INSIDE the new Sale
- Amount field and click
- your RIGHT mouse
- button.
-
- All the object properties
- available will be
- displayed.
-
- 2) Click on the COLOR
- option.
-
- Then, press F2 to
- continue...
- x
-
- ACTION:
- Change the object's
- color.
-
- 1) Under LABEL, use
- the combo box to
- highlight the color you
- want for the field's text
- label.
-
- 2) Click on the OK
- button to save your
- changes.
-
- To continue, press F2.
- x
-
- ACTION:
- Change the field type.
-
- 1) Again, place your
- mouse arrow INSIDE
- the Sale Amount field
- and click your RIGHT
- mouse button.
-
- 2) Select FIELD TYPE
- from the properties
- menu.
-
- 3) Change Field Type to
- CURRENCY under the
- column of Numeric
- types.
-
- 4) Click OK to accept
- your changes.
-
- Then, press F2 to
- continue.
- x
-
- ACTION:
- Create another field.
-
- 1) Click the FIELD
- button on the Object
- Bar.
-
- 2) Name the new field
- COMMISSION, then
- click OK.
-
- 3) Position your mouse
- pointer to the right of
- the Sale Amount field
- and CLICK to place the
- field.
-
- Then, press F2 to
- continue.
- x
-
- ACTION:
- Change the Field Type.
-
- 1) Place your mouse
- arrow INSIDE the
- Commission field and
- click your RIGHT
- mouse button.
-
- 2) Select FIELD TYPE
- from the properties
- menu.
-
- 3) Change Field Type to
- CURRENCY under the
- column of Numeric
- types.
-
- 4) Click OK to accept
- your changes. Then,
- press F2 to continue.
- x
-
- NOTE:
- See ObjectVision 2.1 in
- a real-life application.
-
- In this Trial Disk, we're
- using a fictional auction
- house, AuctionRAMa,
- to demonstrate the
- power of ObjectVision
- applications.
-
- First, we'll add logic to
- our form and calculate
- the commission the
- auction house earns on
- a sale by creating a
- VALUE TREE for the
- commission field. The
- commission amount will
- be based on an item's
- sales price.
-
- To continue, press F2.
- x
-
- About VALUE TREES
- and EVENT TREES...
-
- ObjectVision uses two
- kinds of decision trees
- that let you program
- logic into your
- application:
-
- VALUE TREE. Logic
- that automatically
- calculates a value for a
- specific field, such as a
- sales commission.
-
- EVENT TREE. Logic
- that causes other events
- to happen, such as
- displaying another form.
-
- To continue, press F2.
- x
-
- ACTION:
- To access the TREE
- TOOL, simply double
- click on the
- COMMISSION field.
-
- (You could also access
- this field's properties by
- using your RIGHT
- mouse button and then
- selecting VALUE
- TREE from the
- properties menu.)
-
- Now let's create
- a Tree!
-
- Press F2 to continue...
- x
-
- NOTE:
- The Tree Tool
- Object Bar.
-
- Since we've accessed
- the Tree Tool, you may
- have noticed that the
- Object Bar changed.
-
- It now displays different
- buttons. (The first
- button, which looks like
- a left-point arrow,
- closes the tool.)
-
- To continue, press F2.
- x
-
- ACTION:
- Build a value tree.
-
- 1) First, click once on
- the button which points
- upwards (fourth from
- the left). This will make
- your value tree larger
- and a little easier to see.
-
- 2) Next, Click on the
- second button from the
- left. This tells
- ObjectVision that we
- want to add a "branch"
- to our Tree.
-
- Press F2 to continue.
- x
-
- 1) Find the field called
- SALE AMOUNT on
- the list of fields. Double
- click on it.
-
- You just created the
- first branch of your
- Value Tree! The logic
- we want to use here
- could be expressed like
- this:
-
- IF SALE AMOUNT
- >500
- THEN
- COMMISSION=
- SALE AMOUNT
- * 0.15
- ELSE
- COMMISSION=
- MINIMUM
- COMMISSION
- END IF
-
- To continue, press F2.
- x
-
- ACTION:
- Draw your conclusion.
-
- 1) Next, click the
- Conclusion button
- (upside down triangle)
- and give your first
- condition. Type:
-
- >500
-
- 2) Then click on the OK
- button.
-
- 3) For your conclusion,
- type:
-
- +Sale Amount*0.15
-
- (It's important that you
- begin this expression
- with a + sign.)
-
- 4) Click the OK button
- to accept your entry.
- Then, press F2.
- x
-
- NOTE:
- Whenever you're
- specifying fields, instead
- of typing field names,
- you can click on the
- FIELD button to display
- and select any of the
- available fields.
-
- This way, you don't
- have to memorize your
- field names.
-
- To continue now, press
- the F2 key.
- x
-
- ACTION:
- Now, make your other
- conclusion. (Make sure
- your first conclusion has
- a dotted line border
- around it)
-
- 1) Click the
- CONCLUSION (upside
- down triangle) button
- again.
-
- 2) Leave the expression
- OTHERWISE on the
- Condition line and click
- the OK button.
-
- 3) In the Conclusion
- window, enter the
- expression:
-
- +Minimum Commission
-
- 4) Finally, click the OK
- button and press F2 to
- continue.
- x
-
- NOTE:
- Your value tree is
- complete!
-
- Displayed visually, your
- logic works as follows:
-
- If the first condition is
- met (Sale Amount
- >500), the value of
- Commission will be set
- to 15% of the sale
- amount.
-
- If the first condition is
- NOT met, then the
- value of Commission
- will be set to the value
- of the Minimum
- Commission field.
-
- To continue, press F2.
- x
-
- Now, see your logic in
- action.
-
- 1) First, close the TREE
- TOOL by clicking on
- the CLOSE TOOL
- button (looks like a left-
- pointing arrow).
-
- 2) Next, close the
- FORM TOOL by
- clicking once again on
- the CLOSE TOOL
- button.
-
- Press F2 to continue.
- x
-
- 1) Click in the SALE
- AMOUNT field and
- enter the value:
-
- 200
-
- After pressing <Enter>,
- a Scratchpad prompt
- will automatically
- appear and prompt you
- for a MINIMUM
- COMMISSION value.
-
- 2) Inside the scratchpad
- window, type a
- minimum commission:
-
- 75
-
- After pressing ENTER,
- ObjectVision returns to
- the main form and the
- commission amount is
- displayed.
-
- To continue, press F2.
- x
-
- NOTE:
- ObjectVision's
- Inference Engine.
-
- When you entered a sale
- amount, notice how
- ObjectVision
- automatically prompted
- you for the Minimum
- Commission value. This
- field isn't on your form -
- - but its value was
- needed for the value
- tree to be evaluated.
-
- ObjectVision uses a
- "scratchpad" form to
- display this field while
- guiding you through to
- completion. Imagine
- how much code you'd
- normally have to write
- to get this functionality!
-
- To continue, press F2.
- x
-
- ACTION:
- Automatic Update.
-
- 1) In the Sale Amount
- field, change the value
- to:
-
- 700
-
- 2) Hit the ENTER key
- and notice how the
- commission amount is
- re-calculated
- automatically!
-
- Then, press F2 to
- continue.
- x
-
- Now for the "C" part:
- making connections to
- data.
-
- You're now two-thirds
- of the way finished!
-
- You've built the
- foundation of your
- application by creating
- your Application
- Interface.
-
- Then you've determined
- how your application
- will work by outlining
- your Business Rules
- using Event and Value
- trees.
-
- Now it's time for "C" --
- connecting to a
- database.
-
- Press F2 to continue.
- x
-
- Our goal is to create a
- new form, add a table
- object and link that table
- to a database.
-
- ACTION:
- First, make sure that
- you're in the FORM
- tool.
-
- 1) Click on the TOOLS
- option on the menu bar
- above.
-
- 2) From the TOOLS
- menu select the FORM
- option.
-
- Then, press F2 to
- continue.
- x
-
- NOTE:
- This form shows you an
- example of what you'll
- accomplish next.
-
- You'll be creating a
- table object along with a
- button called TOP.
-
- Then, you'll see how an
- EVENT TREE is used
- to pull data from a
- Paradox table.
-
- To continue, press F2.
- x
-
- ACTION:
- Now, create a new
- form.
-
- 1) Click on the FORM
- menu at the top of the
- screen.
-
- 2) From the FORM
- menu select the NEW
- option.
-
- 3) Name your new
- form, ITEMS. Click
- OK (or press the
- <Enter> key) to accept
- your entry.
-
- To continue, press F2.
- x
-
- Next, expand the new
- form.
-
- We want to make this
- form larger than the
- default size, so:
-
- 1) Drag the form close
- to the upper left corner
- of the ObjectVision
- window.
-
- 2) Then, drag the lower
- right corner of the new
- form to make the new
- form as large as
- possible.
-
- To continue, press F2.
- x
-
- ACTION:
- Add your first table.
-
- 1) Click the table button
- (looks like a table grid)
- on the Object Bar.
-
- 2) Give the table a
- name. (For this exercise,
- the default name,
- "Table1", is fine.).
- Click the OK button.
-
- 3) Click the mouse
- close to the upper-left
- corner of your new
- form. The new table
- object will appear.
-
- To continue, press F2.
- x
-
- ACTION:
- Resize the first column.
-
- 1) Drag the single
- square handle on the
- BOTTOM of the table
- object to increase its
- height vertically. Drag
- it almost to the bottom
- of the form. As you do,
- ObjectVision shows you
- how many rows your
- table will contain.
-
- Make sure that you drag
- the handle on the
- BOTTOM of the object.
- If you accidentally click
- somewhere else on the
- table object, 4 handles
- may appear on the
- corners. To redisplay
- the BOTTOM handle,
- click on the object title
- "Table1".
- x
-
-
- 2) Now, click your
- mouse on the column
- label "Col1" so that 4
- corner handles appear.
-
- 3) Using the handles,
- widen the first column
- of the table -- it should
- occupy at least 1/3rd of
- the form.
-
- Press F2 to continue.
- x
-
- ACTION:
- Add two more columns.
-
- 1) Click on the title,
- "Table1", so that a
- triangle shaped handle
- appears on the right-
- side of the table.
-
- 2) Click and drag this
- triangle handle to the
- right to create a
- SECOND column. This
- column should occupy
- the next 1/3 of your
- form's width.
-
- 3) Once you've
- positioned your second
- column, create a
- THIRD column by
- clicking and dragging
- the triangle as before.
-
- Press F2 to continue.
- x
-
- ACTION:
- Size your columns.
-
- 1) Click on the column
- headings and notice
- how the handles change.
-
- 2) Next, drag the handle
- in the direction you
- want. The column size
- and relative size of the
- table will change
- accordingly.
-
- When you're finished,
- press F2 to continue.
- x
-
- NOTE:
- If you have too many
- columns (we only want
- three), here's how to
- DELETE a column:
-
- 1) Click on the
- unwanted column's
- heading so that the four
- corner handles appear
- on that column.
-
- 2) Drag the upper right
- column handle to the
- left, compressing the
- column width to zero.
-
- 3) ObjectVision will
- then ask if you want the
- column deleted.
-
- To continue, press F2.
- x
-
- ACTION:
- Add a scroll bar.
-
- 1) Click on the table
- heading ("Table1", if
- you originally chose the
- default name.)
-
- 2) Click the RIGHT
- mouse button to access
- table properties.
-
- 3) Click on the
- SCROLLBAR option
- and a scrollbar will be
- added to the right-hand
- side of your table.
-
- To continue, press F2.
- x
-
- ACTION:
- Link your table to a
- Paradox database.
-
- 1) Click on the LINK
- TOOL button (far right
- side of the Object Bar;
- looks like a chain).
-
- 2) The DATA LINKS
- dialog will be displayed
- (note the various
- database formats
- available). With
- Paradox as the default,
- click on the CREATE
- button.
-
-
-
-
-
-
-
-
- Press F2 to continue.
- x
-
- ACTION:
- Name the link.
-
- 1) In the LINK NAME
- field, type:
-
- TABLE
-
- This will be the name
- used to refer to this
- particular link.
-
- Then, press F2.
-
-
-
-
-
-
-
-
-
-
-
- CLICK HERE to
- redisplay instructions.
- x
-
- ACTION:
- Specify the database
- table name.
-
- 1) In the field labeled
- PARADOX TABLE,
- type the filename:
-
- BIDS
-
- BIDS is a table that has
- already been created for
- this example.
-
- Then, press F2 to
- continue.
-
-
-
-
-
-
-
-
- CLICK HERE to
- redisplay instructions.
- x
-
- ACTION:
- Link to the Table.
-
- 1) Click the CONNECT
- button on the right side
- of the Paradox Link
- Creation dialog and
- ObjectVision will
- connect to the BIDS
- database table.
-
- (Note how the fields
- from that table are
- automatically displayed.
- If you pressed <Enter>
- after typing the table
- name BIDS, the
- database fields will
- already be displayed.)
-
- To continue, press F2.
-
-
-
- CLICK HERE to
- redisplay instructions.
- x
-
- ACTION:
- Connect the first
- ObjectVision field to
- your Paradox
- table:
-
- 1) Click on the LINK
- CREATION dialog and
- find the window that
- displays ObjectVision
- fields on the right side.
-
- 2) Double click on the
- field labeled COL1.
-
- (ObjectVision assigns
- this field to correspond
- with the BIDDER field
- from the database.)
-
- To continue, press F2.
-
-
-
- CLICK HERE to
- redisplay instructions.
- x
-
- ACTION:
- Connect the other fields
- from the table object.
-
- 1) Follow the same
- procedure with the fields
- COL2 and COL3.
-
- Double click on them in
- the ObjectVision fields
- list.
-
- To continue,
- press F2.
-
-
-
-
-
-
-
-
-
-
- CLICK HERE to
- redisplay instructions.
- x
-
-
- Once you've linked all
- three database fields to
- the ObjectVision fields
- (Col1, Col2 and Col3),
- click on the OK button.
-
- Then, press F2 to
- continue.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- CLICK HERE to
- redisplay instructions.
- x
-
- ACTION:
- Link automatic buttons.
-
- To speed development,
- ObjectVision
- automatically creates
- control buttons for a
- link. Let's create a single
- button for our new link:
-
- 1) Click the box next to
- the word TOP.
-
- 2) Click the OK button.
-
- To continue, press F2.
-
-
-
-
-
-
-
-
- CLICK HERE to
- redisplay instructions.
- x
-
- ACTION:
- Complete the linking.
-
- 1) Since you're finished
- defining this link, click
- the OK button on the
- DATA LINKS dialog.
-
- 2) The TOP button was
- automatically created
- for you on your form.
- To find it, click on the
- down-arrow button of
- the ObjectVision
- window's scroll bar.
-
- 3) Then, click and drag
- the new TOP button
- and move it up on the
- form so it's close to the
- table.
-
- To continue, press F2.
- x
-
- ACTION:
- View the Event Tree.
-
- ObjectVision
- automatically created an
- event tree for your new
- TOP button.
-
- 1) To see it, double-
- click on the TOP
- button.
-
- When you click on this
- button while running
- your application, the
- actions described in the
- conclusion node of this
- event tree will be taken.
- In this case, when you
- click on this button,
- ObjectVision will move
- to the top of the
- database defined in the
- TABLE link.
-
- To continue, press F2.
- x
-
- Now you can actually
- use your new table
- object.
-
- ACTION:
- First, you must close all
- your TOOLS:
-
- 1) To close the TREE
- TOOL, click on the
- CLOSE TOOL button
- at the far left of the
- Object Bar.
-
- 2) Next, close the
- FORM TOOL by
- clicking again on the
- CLOSE TOOL
- BUTTON.
-
- 3) Now click the TOP
- button and watch the
- data appear!
-
- Press F2 to continue.
- x
-
- NOTE:
- If any cells show
- #######, your column
- isn't wide enough to
- display all the text.
-
- Since we're only using
- part of the screen for
- ObjectVision during this
- First Look, some of the
- data may appear as
- #######.
-
- If you wish, go back to
- the FORM TOOL, click
- on any of the cells and
- increase or decrease
- their width.
-
- Then, close the Form
- Tool and try again.
-
- To continue, press F2.
- x
- This is just the
- beginning!
-
- In this First Look, you
- experienced how easily
- you can build a
- Windows application
- with ObjectVision.
-
- In the Sample
- Application --
- AuctionRAMa -- you'll
- discover ObjectVision's
- flexible linking powers
- and how many different
- ways it can be used.
-
- And in Advanced
- Features, you'll see how
- ObjectVision lets you
- easily add sophisticated
- capabilities with
- multiple data links and
- formats, filters and
- locates, custom @
- functions and more.
- x
-
- Don't miss the Sample
- Applications.
-
- To further illustrate the
- power of ObjectVision
- 2.1, we've included
- more examples of
- ObjectVision sample
- applications on this
- Disk.
-
- You'll see linking to
- dBASE and Paradox
- tables on the same form,
- one-to-many, and many-
- to-many relationships as
- well.
-
- Press F2 to continue.
- x
-
- And don't forget, we're
- backing this Trial Disk
- with the same world
- class support we give all
- Borland products. So at
- any time if you have
- questions, just call
- Borland Technical
- Support at
- 1-408-461-9144.
-
- So click ahead. You're
- well on your way to
- becoming an
- ObjectVision developer!
- x
-
-